import { Menu } from "@/business/entity/menu.entity";

export class MenuServiceImpl {
  getMenus(): Array<Menu> {
    const result: Array<Menu> = [
      new Menu(
        1,
        1,
        "Dashboard",
        "主页",
        "HomeFilled",
        "Dashboard",
        { order: 1 },
        [],
      ),
      new Menu(
        2,
        1,
        "Animation",
        "动画管理",
        "Tools",
        "Animation",
        { order: 2 },
        [
          new Menu(
            3,
            2,
            "Planet",
            "星球管理",
            "PictureFilled",
            "Planet",
            { order: 3 },
            [
                new Menu(
                    4,
                    3,
                    "Satellite",
                    "行星管理",
                    "PictureFilled",
                    "Satellite",
                    { order: 4 },
                    [
                        new Menu(
                            5,
                            4,
                            "Moon",
                            "月球管理",
                            "PictureFilled",
                            "Moon",
                            { order: 5 },
                            [],
                        )
                    ],
                ),
                new Menu(
                    6,
                    3,
                    "Earth",
                    "地球管理",
                    "PictureFilled",
                    "Earth",
                    { order: 6 },
                    [],
                ),
                new Menu(
                    7,
                    3,
                    "Mercury",
                    "水星管理",
                    "PictureFilled",
                    "Mercury",
                    { order: 7 },
                    [],
                ),
            ],
          ),
          new Menu(
              8,
              2,
              "Time",
              "时间管理",
              "PictureFilled",
              "Time",
              { order: 8 },
              [
                  new Menu(
                      9,
                      8,
                      "Minute",
                      "分钟管理",
                      "PictureFilled",
                      "Minute",
                      { order: 9 },
                      [],
                  ),
                  new Menu(
                      10,
                      8,
                      "Month",
                      "月份管理",
                      "PictureFilled",
                      "Month",
                      { order: 10 },
                      [],
                  ),
              ],
          ),
        ],
      ),
      new Menu(
        11,
        1,
        "Other",
        "其他管理",
        "Tools",
        "Other",
        { order: 11 },
        [
            new Menu(
                12,
                11,
                "About",
                "关于我们",
                "PictureFilled",
                "About",
                { order: 12 },
                [],
            ),
        ],
      )

    ];

    const menus: Array<Menu> = [];
    for (let i = 0; i < result.length; i++) {
      const menu = new Menu(
        result[i].id,
        result[i].pId,
        result[i].name,
        result[i].menuName,
        result[i].icon,
        result[i].code,
        result[i].meta,
        result[i].children,
      );
      menus.push(menu);
    }
    return menus;
  }
}
